import { createRouter, createWebHistory } from 'vue-router'
import Layout from '@/layout/index.vue'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'Login',
      meta: { hide: true },
      component: () => import('@/views/Login/index.vue')
    },
    {
      path: '/404',
      name: '404',
      meta: { hide: true },
      component: () => import('@/views/404/index.vue')
    },
    {
      path: '/',
      name: 'Home',
      component: Layout,
      redirect: '/dashboard',
      children: [{
        path: '/dashboard',
        name: 'Dashboard',
        component: () => import('@/views/Home/index.vue'),
        meta: { title: '平台首页', icon: 'dashboard' }
      }]
    },
  ]
})

export default router
